import { Link } from 'react-router-dom'
import { Button } from '@/components/ui/button'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Badge } from '@/components/ui/badge'
import { 
  Stethoscope, 
  Bot, 
  ArrowRight, 
  Shield, 
  Clock, 
  Users,
  Sparkles,
  Heart,
  Brain
} from 'lucide-react'

export default function HomePage() {
  const agents = [
    {
      id: 'medical',
      title: '医疗智能体',
      description: '专业的医疗咨询助手，提供症状分析、健康建议和医疗知识解答',
      icon: Stethoscope,
      color: 'from-blue-500 to-blue-600',
      features: ['症状分析', '健康建议', '用药指导', '疾病预防']
    },
    {
      id: 'super',
      title: '超级智能体',
      description: '全能型AI助手，具备多领域知识，可处理各种复杂问题和任务',
      icon: Bot,
      color: 'from-green-500 to-green-600',
      features: ['多领域知识', '12306查询', '路线规划', '天气查询']
    }
  ]

  const features = [
    {
      icon: Shield,
      title: '安全可靠',
      description: '采用先进的数据加密技术，保护用户隐私安全'
    },
    {
      icon: Clock,
      title: '24/7服务',
      description: '全天候在线服务，随时为您提供智能咨询'
    },
    {
      icon: Users,
      title: '高可用模型',
      description: '集成多种大模型，保证高可用'
    }
  ]

  return (
    <div className="min-h-screen">
      {/* Hero Section */}
      <section className="relative px-6 py-16 md:py-24">
        <div className="max-w-6xl mx-auto text-center">
          <div className="inline-flex items-center space-x-2 bg-blue-100 text-blue-700 px-4 py-2 rounded-full text-sm font-medium mb-6">
            <Sparkles className="w-4 h-4" />
            <span>智能医疗新时代</span>
          </div>
          
          <h1 className="text-4xl md:text-6xl font-bold text-gray-900 mb-6">
            灵溪医疗助手
            <span className="bg-gradient-to-r from-blue-600 to-green-500 bg-clip-text text-transparent">
              智能体平台
            </span>
          </h1>
          
          <p className="text-xl text-gray-600 mb-8 max-w-3xl mx-auto leading-relaxed">
            融合前沿AI技术与专业医疗知识，为您提供智能化的医疗咨询服务。
            让AI成为您的健康守护者，随时随地获得专业的医疗建议。
          </p>
          
          <div className="flex flex-col sm:flex-row gap-4 justify-center">
            <Button size="lg" className="bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800">
              <Heart className="w-5 h-5 mr-2" />
              开始体验
            </Button>
            <Button size="lg" variant="outline">
              了解更多
            </Button>
          </div>
        </div>
        
        {/* Background decoration */}
        <div className="absolute inset-0 -z-10 overflow-hidden">
          <div className="absolute top-1/4 left-1/4 w-64 h-64 bg-blue-200 rounded-full opacity-20 blur-3xl"></div>
          <div className="absolute bottom-1/4 right-1/4 w-64 h-64 bg-green-200 rounded-full opacity-20 blur-3xl"></div>
        </div>
      </section>

      {/* AI Agents Section */}
      <section className="px-6 py-16 bg-white/50">
        <div className="max-w-6xl mx-auto">
          <div className="text-center mb-12">
            <h2 className="text-3xl md:text-4xl font-bold text-gray-900 mb-4">
              选择您的智能助手
            </h2>
            <p className="text-lg text-gray-600 max-w-2xl mx-auto">
              我们提供两种专业的AI智能体，满足您不同的需求场景
            </p>
          </div>
          
          <div className="grid md:grid-cols-2 gap-8">
            {agents.map((agent) => {
              const Icon = agent.icon
              return (
                <Card key={agent.id} className="group hover:shadow-xl transition-all duration-300 border-0 bg-white/80 backdrop-blur-sm">
                  <CardHeader className="pb-4">
                    <div className={`w-16 h-16 bg-gradient-to-r ${agent.color} rounded-2xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300`}>
                      <Icon className="w-8 h-8 text-white" />
                    </div>
                    <CardTitle className="text-2xl text-gray-900">{agent.title}</CardTitle>
                    <CardDescription className="text-gray-600 text-base leading-relaxed">
                      {agent.description}
                    </CardDescription>
                  </CardHeader>
                  
                  <CardContent className="pt-0">
                    <div className="flex flex-wrap gap-2 mb-6">
                      {agent.features.map((feature) => (
                        <Badge key={feature} variant="secondary" className="bg-gray-100 text-gray-700">
                          {feature}
                        </Badge>
                      ))}
                    </div>
                    
                    <Link to={`/chat/${agent.id}`}>
                      <Button className="w-full group-hover:bg-gradient-to-r group-hover:from-blue-600 group-hover:to-green-500 transition-all duration-300">
                        开始对话
                        <ArrowRight className="w-4 h-4 ml-2 group-hover:translate-x-1 transition-transform" />
                      </Button>
                    </Link>
                  </CardContent>
                </Card>
              )
            })}
          </div>
        </div>
      </section>

      {/* Features Section */}
      <section className="px-6 py-16">
        <div className="max-w-6xl mx-auto">
          <div className="text-center mb-12">
            <h2 className="text-3xl md:text-4xl font-bold text-gray-900 mb-4">
              为什么选择我们
            </h2>
            <p className="text-lg text-gray-600 max-w-2xl mx-auto">
              专业、安全、智能的医疗AI服务，让健康管理更简单
            </p>
          </div>
          
          <div className="grid md:grid-cols-3 gap-8">
            {features.map((feature, index) => {
              const Icon = feature.icon
              return (
                <div key={index} className="text-center group">
                  <div className="w-16 h-16 bg-gradient-to-r from-blue-100 to-green-100 rounded-2xl flex items-center justify-center mx-auto mb-4 group-hover:scale-110 transition-transform duration-300">
                    <Icon className="w-8 h-8 text-blue-600" />
                  </div>
                  <h3 className="text-xl font-semibold text-gray-900 mb-2">{feature.title}</h3>
                  <p className="text-gray-600 leading-relaxed">{feature.description}</p>
                </div>
              )
            })}
          </div>
        </div>
      </section>
    </div>
  )
}